class sanshuhe:
    def __init__(self,nums):
        self.nums=nums;
    def solution(self):
        num=[];
        for i in range(0,len(self.nums)-2):
            for j in range(i+1, len(self.nums)-1):
                for k in range(j+1, len(self.nums)):
                    if(i!=j!=k):
                        if(self.nums[i]+self.nums[j]+self.nums[k]==0):
                            list=[self.nums[i],self.nums[j],self.nums[k]];
                            num.append(list);
        if(num):
            if(len(num)<=1):
                print(num);
            elif(len(num)>=2):
                for i in range(0,len(num)-1):
                    for j in range(i+1,len(num)):
                        if(sorted(num[i])==sorted(num[j])):
                            num.remove(num[i]);
                print(num);
        else:
            print("[]");


if __name__ == '__main__':
    a=input("请输入一串数字");
    num=[];
    for i in a.split(","):
        num.append(int(i));
    print(num);
    b=sanshuhe(num);
    b.solution();






